﻿using System;
using System.Windows.Forms;

namespace jTCodeGenerate
{
    public partial class RenameDialogForm : Form
    {
        public Action<string> BtnOkClick;
        public RenameDialogForm()
        {
            InitializeComponent();
        }

        private void btn_close_Click(object sender, EventArgs e)
        {
            this.textBox1.Text = "";
            this.Close();
        }

        private void btn_ok_Click(object sender, EventArgs e)
        {
            var name = this.textBox1.Text;
            if (BtnOkClick != null)
                BtnOkClick.Invoke(name);
            this.Close();
        }
    }
}
